def fibonacciNum(n):
    if n<=0:
        return 0
    elif n==1:
        return 1
    a,b=1,1
    sum=2
    for i in range(3,n+1):
        a,b=b,a+b
        sum=sum+b
    return sum
i=eval(input("请输入一个整数:"))
print("{}的斐波那契数列和为{}".format(i,fibonacciNum(i)))